package com.frame.work.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frame.work.entity.TblSensirionLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wjming
 */
@DS("slave_1")
public interface TblSensirionLogMapper extends BaseMapper<TblSensirionLog> {
    /**
     * 查询一段时间内的计量数据
     *
     * @param pageNum
     * @param pageSize
     * @param gatewayMac
     * @param deviceMac
     * @param start
     * @param end
     * @return
     */
    List<TblSensirionLog> selectByTime(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("gatewayMac") String gatewayMac, @Param("deviceMac") String deviceMac, @Param("start") String start, @Param("end") String end);

    /**
     * 查询当天的计量数据
     *
     * @param gatewayMac
     * @param deviceMac
     * @param start
     * @param end
     * @return
     */
    List<TblSensirionLog> selectByToday(@Param("gatewayMac") String gatewayMac, @Param("deviceMac") String deviceMac, @Param("start") String start, @Param("end") String end);
}